import store from '../../../store/store.js'
import * as ActionTypes from '../../../constants/constants.js'
import { isUser, isWxUser, path, saveData, loadData, removeData, requstPromise } from '../../../util/utils.js'
import request from '../../../api/request.js'

export async function getUserLogin(options) {
    const { dispatch } = this.props
    const res = await request.getUserLogin(options)
    if (res) {
        dispatch({
            type: ActionTypes.GET_USER_INFO,
            data: res.data
        })
    }
    return requstPromise(res)

}
